#ifndef __RTC_H
#define __RTC_H

#ifdef __cplusplus
 extern "C" {
#endif
  
#include "stm32f10x.h"
#include "bsp_coreboard_led.h"   
#include "uart.h"   
#include <time.h>
#include <stdlib.h>


 extern struct tm rtc;  
 
 extern  time_t time_acc_sec; 
 extern u32 real_tim_acc_sec;

time_t get_daytime(void);

//#define SecPerComYear  31536000//(365*3600*24)
//#define SecPerLeapYear 31622400//(366*3600*24)
//#define SecPerFourYear 126230400//((365*3600*24)*3+(366*3600*24))
//#define SecPerDay      (3600*24)

  
extern bool RTC_irq_Flag;

extern u32 real_tim_acc_sec;


void RTC_Init(void);

void RTC_Configuration(void);

  
   
//#define RTCClockOutput_Enable  /* RTC Clock/64 is output on tamper pin(PC.13) */   

#ifdef __cplusplus
}
#endif
#endif /* __RTC_H */




